package com.ruoyi.datastatistics.domain;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import lombok.*;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 欠费明细对象 t_bill
 *
 * @author zt
 * @date 2025-05-27
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName("t_bill")
public class Bill extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 开账主键 */
    @TableId(value="id",type = IdType.AUTO)
    private Long id;

    @TableField("area_id")
    private String areaId;

    /** 租户号 */
    // @Excel(name = "租户号" ,isExport =false)
    @TableField("tenant_id")
    private String tenantId;

    /** 用户编号 */
    @Excel(name = "用户编号",sort = 2)
    @TableField("user_id")
    private String userId;

    /** 总价 */
    @Excel(name = "合计金额（元）", sort = 5, isStatistics =true)
    @TableField("total_price")
    private BigDecimal totalPrice;

    /** 违约金 */
    // @Excel(name = "违约金",isExport =false)
    @TableField("late_fee")
    private BigDecimal lateFee;

    /** 账单日期 */

    @Excel(name = "属期",sort = 4)
    @TableField("read_date")
    private String readDate;

    /** 状态(0:未核销 1:已核销) */
    // @Excel(name = "状态(0:未核销 1:已核销)")
    @TableField("status")
    private Integer status;

    @TableField("location_nb")
    private String locationNb;

    @TableField(exist = false)
    @Excel(name = "用户名称",sort = 1)
    private String userName;

    @TableField(exist = false)
    private String areaName;

    @TableField(exist = false)
    private Integer energyType;

    @TableField(exist = false)
    private String sheetsCode;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("create_time")
    private Date createTime;

    @TableField("usage_type")
    @Excel(name = "收费项目",sort = 3 ,dictType = "usage_type", dictTypeOnlyForExport = true)
    private Integer usageType;

    @TableField("total_val")
    private BigDecimal totalVal;

    @TableField("unit_price")
    private BigDecimal unitPrice;

    @TableField(exist = false)
    private List<String> readDateList;
}
